<template>
	<view style="display: flex;align-items: center;justify-content: center;">
		<a-input-group compact>
			<a-select default-value="" @change="onChange" v-model="currentValue">
				<a-select-option value=''>请选择</a-select-option>
				<a-select-option value="0">
					欠费
				</a-select-option>
				<a-select-option value="1">
					正常
				</a-select-option>
				<a-select-option value="2">
					禁用
				</a-select-option>
			</a-select>
		</a-input-group>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				currentValue: ''

			}
		},
		methods: {
			onChange(e) {
				if (e === '') {
					// Remove the filter
					this.params.parentFilterInstance((instance) => {
						instance.onFloatingFilterChanged('');
					});
					return;
				}

				this.params.parentFilterInstance((instance) => {
						instance.onFloatingFilterChanged(this.currentValue)
					//instance.onFloatingFilterChanged('equals', this.currentValue);
				});
			},
			onParentModelChanged(parentModel) {
				// When the filter is empty we will receive a null value here
				if (!parentModel) {
					this.currentValue = '';
				} else {
					this.currentValue = parentModel.filter;
				}
			},
		}
	}
</script>

<style>
</style>
